package com.wtwd.device.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wtwd.device.model.entity.DeviceBloodOxygen;
import com.wtwd.device.model.entity.DeviceBloodOxygenTotal;
import com.wtwd.device.model.vo.BloodOxygenVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AppDeviceBloodOxygenTotalMapper  extends BaseMapper<DeviceBloodOxygenTotal> {

    int insertOrUpdate(DeviceBloodOxygenTotal deviceBloodOxygenTotal);

    int bathInsertOrUpdate(@Param("list") List<DeviceBloodOxygenTotal> deviceBloodOxygenTotals);

    /**
     * 通过日期查询一台设备数据最新那条数据
     * @param deviceId
     * @param time
     * @return
     */
    BloodOxygenVo selectBloodOxygenByTime(@Param("deviceId") Long deviceId,@Param("time") String time);
}
